{template header}
<script src="{SITE_URL}public/js/uploadify/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>
<script src="{SITE_URL}public/js/uploadify/swfobject.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="{SITE_URL}public/js/uploadify/uploadify.css" />
<script type="text/javascript">
$(document).ready(function(){
	$("#uploadify").uploadify({
		'uploader': siteUrl+'public/js/uploadify/uploadify.swf',
		'script': siteUrl+'index.php',
		'scriptData':{'app':'attach','ac':'upload','ts':'do','userid':'{$TS_USER[user][userid]}','albumid':'{$albumid}'},
		'method':'GET', 
		'cancelImg': siteUrl+'public/js/uploadify/cancel.png',
		'folder': 'UploadFile',
		'queueID': 'fileQueue',
		'auto': true,
		'multi': true,
		'buttonImg':siteUrl+'public/images/upload.png',
		'sizeLimit' : 2097152,//文件的极限大小，以字节为单位，0为不限制。1MB:1*1024*1024
		'fileDesc':'txt,doc,wps,ppt,rar,zip图片格式',
		'fileExt':'*.txt;*.doc;*.wps;*.ppt;*.rar;*.zip;*.7z',
		'onAllComplete' : function(event,data) {
			window.location = "{tsUrl('attach','album',array('id'=>$albumid))}";
		}
	});
})

</script>

<div class="midder">

<div class="mc">

<div class="bbox">

{template menu}

<h1>上传资料</h1>

<div style="padding:0 10px;">

<p style="padding:10px 0;">上传文件只支持：txt,doc,rar,zip,7z,wps,ppt格式</p>
<div id="fileQueue"></div>
<input type="file" id="uploadify" />
<p style="padding:10px 0;">
<a class="btn btn-success" href="javascript:$('#uploadify').uploadifyUpload()">上传资料</a>
<a class="btn" href="javascript:$('#uploadify').uploadifyClearQueue()">取消上传</a>
</p>
</div>

</div>

</div>
</div>

{template footer}